(function() {
    var application = new Ext.Application({
        name: 'Ext.ux.mattgoldspink.subsonic',
        defaultUrl: 'dashboard',
        launch: function(profile){
            //switch to json mode for everything
            Ext.ux.mattgoldspink.subsonic.LoginDetails.f = 'json';
            Ext.Router.draw(function(map) {
                map.connect('songView/[a-zA-Z0-9]+/[a-zA-Z0-9]+', {controller: 'Ext.ux.mattgoldspink.subsonic.controllers.SongView', action: 'loadFolder'});
				map.connect('', {controller: 'Ext.ux.mattgoldspink.subsonic.controllers.SongView', action: 'loadFolder'});
            });
        }
    });
})(); 